using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
namespace ePlanSysOman
{
  public partial class frmSearch
  {
      
    private void  // ERROR: Handles clauses are not supported in C#
gridSearchResult_DoubleClick(object sender, System.EventArgs e)
    {
      Application.DoEvents();
      frmWait frma = new frmWait();//look at
      frma.MdiParent = frmMain.start;
      frma.Show();
      Application.DoEvents();
      Module1.newModule.excist = true;
      //Dim frmser As New frmSelSerial
      //frmser.ShowDialog()

      Module1.newModule.plnumber = Conversions.ToString(GridView1.GetRowCellValue(GridView1.GetSelectedRows()[0], "genPlId"));
      string ar;

      ar = Conversions.ToString(GridView1.GetRowCellValue(GridView1.GetSelectedRows()[0], "genPlannumber"));
      Module1.newModule.STRPLANO = ar;
      Module1.newModule.AreaNo = Conversions.ToInteger(ar.Substring(0, 2));
      //description = GridView1.GetRowCellValue(GridView1.GetSelectedRows(0), "Description")
      //  PlanNumber = PLANID
      if (Module1.newModule.AreaNo == 50)
      {
        frmElectrical frm = new frmElectrical();
        frm.MdiParent = frmMain.start;
        frm.Text = ar;
        frm.Show();
      }
      else if (Module1.newModule.AreaNo == 30)
      {
        frmBackshopNew frm = new frmBackshopNew();//JMR
        frm.MdiParent = frmMain.start;
        frm.Text = ar;
        frm.Show();

      } else {

        frmOps frm = new frmOps();
        Module1.newModule.editCard = true;
        frm.MdiParent = frmMain.start;
        frm.Text = ar;//JMR
        frm.Show();
      }



      frma.Close();
    }

      public frmSearch()
    {
        InitializeComponent(); 
    }
  }
}

